package com.wise.service.cms.content.categoryindustry;

import cn.hutool.core.bean.BeanUtil;
import com.wise.summer.v1.cms.content.category.AddCategory;
import com.wise.summer.v1.cms.content.categoryindustry.AddCategoryIndustry;
import org.springframework.stereotype.Service;
import org.summerframework.model.SummerService;
import org.summerframework.model.SummerServiceBean;

/**
 * @author shaoming
 * @date 2019-09-10
 */
@Service
@SummerService
public class AddCategoryIndustryService implements SummerServiceBean<AddCategoryIndustry> {

	@Override
	public void sum(AddCategoryIndustry summer) {
		AddCategory addCategory = new AddCategory();
		BeanUtil.copyProperties(summer, addCategory);
		addCategory.setCategoryType(1);
		addCategory.sum();
		summer.setSummerResult(addCategory.getSummerResult());
	}
}
